/**
 * 
 */
package de.wesemann.jdedun.implementation.district;

import java.util.List;
import java.util.Map;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import de.wesemann.jdedun.entities.district.streets.DistrictStreet;
import de.wesemann.jdedun.entities.district.streets.DistrictStreetsContainer;
import de.wesemann.jdedun.implementation.AbstractResource;
import de.wesemann.jdedun.implementation.ImplementationInterface;
import de.wesemann.jdedun.implementation.mediahandbook.MediahandbookBranchesImpl;

/**
 * @author spinner0815
 * 
 */
public class DistrictStreetsImpl implements ImplementationInterface {
    private String urlStub = "district/streets";
    private Logger logger = LoggerFactory
	    .getLogger(DistrictStreetsImpl.class);
    private AbstractResource resource = new AbstractResource(urlStub);

    public int count() {
	return resource.count();
    }

    public List<DistrictStreet> getAll() {
	return resource.getAll(DistrictStreetsContainer.class).getData();
    }

    public List<DistrictStreet> getFirstN(int n) {
	return resource.get(n, 0, DistrictStreetsContainer.class).getData();
    }

    public List<DistrictStreet> getNextN(int n, int offset) {
	return resource.get(n, offset, DistrictStreetsContainer.class)
		.getData();
    }

    public List<DistrictStreet> search(Map<String, String> searchTupel) {
	return resource.search(searchTupel, DistrictStreetsContainer.class)
		.getData();
    }

    public String getURLStub() {
	return this.urlStub;
    }

    public void setURLStub(String urlStub) {
	this.urlStub = urlStub;
    }
}
